package com.taxi.action;

import java.util.List;

import com.taxi.bean.SectorDTO;
import com.taxi.service.PaqueteBusinessDelegate;
import com.taxi.service.SectorService;
import com.opensymphony.xwork2.ActionSupport;

public class SectorAction extends ActionSupport {

private static final long serialVersionUID = 1L;
	
	private SectorService service = PaqueteBusinessDelegate.getSectorService();
	private boolean success;
	private List<SectorDTO> lstSector;
	
	public String cargarSectores(){
		
		try {
			lstSector = service.cargarSector();
			setSuccess(true);	
		} catch (Exception e) {
			setSuccess(false);
		}
		
		return SUCCESS;
		
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public List<SectorDTO> getLstSector() {
		return lstSector;
	}

	public void setLstSector(List<SectorDTO> lstSector) {
		this.lstSector = lstSector;
	}
	
}
